import 'dart:ffi';
import 'dart:io';

import 'package:flutter/material.dart';
import 'package:get/get.dart';

import '../../../../../../model/build_info.dart';
import '../../../../../../model/lift_info.dart';
import 'specs_logic.dart';

class SpecsPage extends StatelessWidget {

  var logic;

  SpecsPage({Key? key,required BuildInfo buildInfo, required LiftInfo liftInfo}) : super(key: key){
    Get.delete<SpecsLogic>();
    logic = Get.put(SpecsLogic());
    logic.buildInfo = buildInfo;
    logic.liftInfo = liftInfo;
  }

  @override
  Widget build(BuildContext context) {
    final width = MediaQuery.of(context).size.width;
    return Container(
      // color: Colors.green,
      padding: const EdgeInsets.fromLTRB(6, 0, 6, 10),
      child: SingleChildScrollView(
        child: Obx(() {
          return Column(
            children: [
              if(""==logic.imgPath.value)
                Text(logic.msg.value),
              if(""!=logic.imgPath.value)
               Image.file(File(logic.imgPath.value),width: width-12,fit: BoxFit.fitWidth,),
              const SizedBox(height: 200,)
            ],
          );
        }),
      ),
    );
  }
}
